package com.uowenjie;

import com.uowenjie.config.MyRemoteAddKeyResolver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class Server1 {
    public static void main(String[] args) {
        SpringApplication.run(Server1.class);
    }

    @RequestMapping("/serverhealth")
    public String test(){
        System.out.println("========serverhealth========");
        return "ok";
    }

    @Bean(name="myRemoteAddrKeyResolver")
    public MyRemoteAddKeyResolver getmyRemoteAddrKeyResolver(){
        System.out.println("9999999999999999999getmyRemoteAddrKeyResolver");
        return  new MyRemoteAddKeyResolver();
    }
}
